package com.four.user.controller;


import com.four.user.entity.City;
import com.four.user.service.ICityService;
import com.guli.common.utils.R;
import com.guli.common.vo.CityVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author gs
 * @since 2021-12-22
 */
@RestController
@RequestMapping("user/city")
public class CityController {

    @Autowired
    private ICityService cityService;

    /**
     * 查询地址
     * 三级树
     * @return
     */
    @GetMapping("/threeCity")
    public List<CityVo> threeCity(){
        List<CityVo> cityList=cityService.threeCity();
        return cityList;
    }

}
